<template>
  <div id="index">
    <mt-header fixed>
      <mt-button slot="left">豆花麻将-代理后台</mt-button>
      <mt-button slot="right">微信客服:<span class="color"> dhmj16 </span></mt-button>
    </mt-header>
    <user></user>
    <user-extra-info></user-extra-info>
    <nav-box></nav-box>
  </div>
</template>
<script>
  import User from "../../components/User/User"
  import NavBox from "../../components/NavBox/NavBox"
  import UserExtraInfo from "../../components/UserInformation/UserExtraInfo";
  import {
    MessageBox
  } from 'mint-ui';
  import {
    testLogin,
    testFun
  } from "../../api/api";
  export default {
    name: "index",
    components: {
      User,
      NavBox,
      UserExtraInfo
    },
    data() {
      return {};
    },
    methods: {
      sechBlanceMoney() {
        let yujinnum = this.$store.state.user.prompt;
        // console.log(yujinnum);
        let yujin = localStorage.getItem('yujin');
        // console.log(yujin)
        if (yujin == null) {
          localStorage.setItem('yujin', 'true');
        }
        yujin = localStorage.getItem('yujin');
        if (yujin == "true") {
          yujin = true;
        } else if (yujin == "false") {
          yujin = false;
        }
        if (yujin) {
          let zunshinum = this.$store.state.user.balanceMoney;
          if (zunshinum < yujinnum) {
            MessageBox("提示", "钻石数量低于钻石预警值，请及时充值");
          }
        }
      }
    },
    mounted() {
      document.body.style.background = "#fffbef";
    },
    created() {
      this.sechBlanceMoney()
    },
    mounted() {}
  }
</script>

<style lang="scss" scoped>
  body {
    background: red !important;
  }
  .mint-header {
    background-color: #313131;
  }
  #index {
    padding-bottom: 30px;
    border-bottom: 6px solid #ece6d5;
  }
  .color{
    color: #ffa91e;
    font-weight: 600;
    font-style:italic;

  }
</style>
